//
//  YZEnterVC.m
//  VET
//
//  Created by Lam BG on 2018/6/27.
//  Copyright © 2018年 YZ. All rights reserved.
//

#import "YZEnterVC.h"
#import "YZLoginVC.h"
#import "YZRegisterVC.h"
#import "YZMainNavigationController.h"

#import "YZStatementHeader.h"

#import "UIView+Frame.h"
#import "UIColor+Category.h"
#import "UIImage+Gradient.h"

@interface YZEnterVC ()

@property (weak, nonatomic) IBOutlet UIImageView *bgIV;

@property (weak, nonatomic) IBOutlet UIButton *loginBtn;

@property (weak, nonatomic) IBOutlet UIButton *registerBtn;

@end

@implementation YZEnterVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.

    self.bgIV.image = [UIImage gradientFillSize:CGSizeMake(self.bgIV.width, self.bgIV.height) withFirstColor:yzColorGS andSecondColor:yzColorGE];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    
    [self.navigationController setNavigationBarHidden:YES animated:animated];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    
    [self.navigationController setNavigationBarHidden:NO animated:animated];
}

- (IBAction)loginClicked:(id)sender {
    
    // 登录
    UIStoryboard *personalStoryboard = [UIStoryboard storyboardWithName:@"YZLaunchSB" bundle:nil];
    YZLoginVC *rootVC = [personalStoryboard instantiateViewControllerWithIdentifier:@"YZLoginVC"];
    [self.navigationController pushViewController:rootVC animated:YES];
}

- (IBAction)registerClicked:(id)sender {
    
    // 注册
    UIStoryboard *personalStoryboard = [UIStoryboard storyboardWithName:@"YZLaunchSB" bundle:nil];
    YZRegisterVC *rootVC = [personalStoryboard instantiateViewControllerWithIdentifier:@"YZRegisterVC"];
    [self.navigationController pushViewController:rootVC animated:YES];
}

@end











